#ifndef __Bike_H__
#define __Bike_H__

#include <OIS.h>
#include <Ogre.h>
#include <btBulletDynamicsCommon.h>

#include "tinyxml/tinyxml.h"

#include "Actor.h"
#include "BtOgre/BtOgrePG.h"
#include "BtOgre/BtOgreGP.h"
#include "BtOgre/BtOgreExtras.h"
#include "BulletCollision/CollisionDispatch/btGhostObject.h"

#include "btHoverVehicle.h"
//#include "IProjectShadow.h"

using namespace Ogre;


class Bike : public Actor
{
public:
    Real mass;

    Real throttle;
    Real engineIncrement;
    Real engineMax;
    Real brakeIncrement;
    Real steeringIncrement;
    Real steerLimit;

    Real springConstant;

    bool verticleThrustEnabled;
    bool gyroEnabled;

    ParticleSystem* engineParticles;
//    ParticleSystem* dustParticles;
//    ParticleSystem* circleParticles;
//    SceneNode* groundParticleNode;

    btHoverVehicle* vehicle;
//    btRaycastVehicle *vehicle;
//    btDefaultVehicleRaycaster* vehicleRayCaster;
//    btRaycastVehicle::btVehicleTuning   tuning;

    bool mFire;


    Light* headLight;
    Light* backLight;

    bool frameStarted(const Ogre::FrameEvent &evt);
    bool frameEnded(const Ogre::FrameEvent &evt);

//    virtual void init(Ogre::Root*);
    virtual void init(Ogre::Root* OgreRoot, SceneManager*);
    void init(Ogre::Root*, SceneManager* sceneMgr, btDiscreteDynamicsWorld*, String);
//    void init(Ogre::Root*, SceneManager* sceneMgr, btDynamicsWorld*, String);
    void Fire();

    Bike(SceneManager*);
    virtual ~Bike();

protected:
//    btDynamicsWorld* phyWorld;
    btDiscreteDynamicsWorld* phyWorld;
	Ogre::Root *mRoot;
	Ogre::SceneManager* mSceneMgr;

};
#endif
